<template>
  <div>
    <el-button type="info" @click="setState">setState</el-button>
  </div>
</template>
<script setup lang="ts">
import action from "../qiankun/actionb";
let locState: Record<string, any>;
action.onGlobalStateChange(
  (state: Record<string, any>, prev: Record<string, any>) => {
    console.log(state, prev);
    locState = state;
  },
  true
);
let setState = () => {
  locState.abc++;
  action.setGlobalState(locState);
};
</script>
